<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('查看任务')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">

    <form class="form-horizontal m" id="form-task-add">
        <input id="typeId" name="typeId" type="hidden" th:field="${task.taskId}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label" required>任务标题：</label>
            <div class="col-sm-8">
                <span class="form-control" name="taskTitle" id="taskTitle" th:value="${task.taskTitle}" th:text="${task.taskTitle}"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">任务处理时间：</label>
            <div class="col-sm-3">
                <span class="form-control" name="taskStartTime" id="taskStartTime"
                      th:text="${taskStartTime}" th:value="${taskStartTimeValue}"></span>
            </div>
            <div class="col-sm-1">
                ——
            </div>
            <div class="col-sm-4">
                <span class="form-control"  name="taskEndTime" id="taskEndTime"
                      th:text="${taskEndTime}" th:value="${taskEndTimeValue}"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label" required>下发人员：</label>
            <div class="col-sm-8">
                <span class="form-control" name="userId"  th:value="${user.userId}" th:text="${user.userName}"></span>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label ">创建时间：</label>
            <div class="col-sm-8">
                <span class="form-control" id="createTime"
                      th:value="${createTimeValue}" th:text="${createTime}"></span>
            </div>
        </div>



        <div class="form-group">
            <label class="col-sm-3 control-label">紧急程度：</label>
            <div class="col-sm-8">
                <span  class="form-control" name="taskLeave" th:value="${leave.taskLeave}" th:text="${leave.leaveName}"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">任务内容：</label>
            <div class="col-sm-8">
                <span type="text" name="taskContent"  class="form-control" rows="3" th:text="${task.taskContent}"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">任务状态：</label>
            <div class="col-sm-8">
                <select class="form-control" name="deptId" id="dept_select">
                    <option th:each="s:${statuss}" th:value="${s.taskStatus}"
                            th:selected="${task.taskStatus eq s.taskStatus}">[[${s.statusName}]]
                    </option>
                </select>
            </div>
        </div>
        <div class="form-group">
        <label class="col-sm-3 control-label">任务完成情况：</label>
        <div class="col-sm-8">
            <textarea  name="taskContent" maxlength="500" class="form-control" rows="3" th:text="${task.taskContent}" required></textarea>
        </div>
        </div>

    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "cyq/task/task";

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-task-add').serialize());
        }
    }
</script>
</body>
</html>
